package msu.ml.data.level2;

/**
 * @author Reginald M Mead
 * @version 1.0
 *
 * The Packet class represents the header
 * of a Nexrad Level II data file.
 *
 */
public class Header 
{

	/**
	 * "ARCHIVE2." or "AR2V0001."
	 */
	public byte[] name;
	/**
	 * Extension : 1, 2, ...
	 */
	public byte[] ext;
	/**
    * Modified Julian Date since January 1 1970
    * (Simply the number of days since 01/01/1970)
	 */
	public int date;
	/**
	 * Milliseconds since midnight (UTC)
	 */
	public int time;

   public byte [] call;

	/**
	 * Create a new Header
	 */
	public Header(int nameSize)
   {
		name = new byte[nameSize];
		ext = new byte[3];
      call = new byte[4];
   }

	/**
	 * Create a new Header
	 */
	public Header()
	{
      this(9);
	}

	/**
	 * Get a string representation of thi header
	 */
	public String toString()
	{
		String result = "File Name: " + new String(name) + "\n";
		result += "Ext: " + new String(ext) + "\n";
		result += "Date: " + date + "\n";
		result += "Time: " + time + "\n";
		return result;
	}
}
